const router = require('koa-router')()
const roleApiCon = require('../controller/roleApiController')
const tokenCheck = require('../middlewares/auth')




router.prefix('/apis/role')

router.all('*',tokenCheck.tokenCheck)

router.get('/roles',roleApiCon.getAllRoles)

router.post('/setRole',roleApiCon.addRole)

router.delete('/setRole/:id',roleApiCon.deleteRole)

router.put('/setRole',roleApiCon.updateRole)

module.exports = router